#include <bits/stdc++.h>

using namespace std;

string a,b;

void solve(int n){
	int n1=0,n2=0;
	for (int i = 0; i < n; ++i)
	{
		if(a[i]<b[i]){
			n2++;
		}else if(a[i]>b[i]){
			n1++;
		}
	}
	if(n1==n2){
		printf("EQUAL\n");
	}else if(n1>n2){
		printf("RED\n");
	}else{
		printf("BLUE\n");
	}
}

int main(int argc, char const *argv[])
{
	int T;scanf("%d",&T);
	int cnt=0;
	while(cnt<T){
		int n;scanf("%d",&n);
		cin>>a>>b;
		solve(n);
		cnt++;
	}
	return 0;
}